/*  Copyright (C) 2009 Jos van der Til
    
    This file is part of the Fluent Metadata Library.

    The Fluent Metadata Library is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    The Fluent Metadata Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with the Fluent Metadata Library.  If not, see <http://www.gnu.org/licenses/>.
 */
using System;
using System.ComponentModel.DataAnnotations;
using FluentMetadata.Attributes;

namespace FluentMetadata.AttributeBuilders.Validation.DataTyping
{
    public class DataTypeAttributeContainer : IDataTypeAttributeContainer
    {
        internal DataTypeAttributeContainer()
        {
            //No external construction allowed!
        }

        public Attribute InnerAttribute { get; private set; }

        public void Custom()
        {
            InnerAttribute = new DataTypeWrapper(DataType.Custom);
        }

        public void DateTime()
        {
            InnerAttribute = new DataTypeWrapper(DataType.DateTime);
        }

        public void Date()
        {
            InnerAttribute = new DataTypeWrapper(DataType.Date);
        }

        public void Time()
        {
            InnerAttribute = new DataTypeWrapper(DataType.Time);
        }

        public void Duration()
        {
            InnerAttribute = new DataTypeWrapper(DataType.Duration);
        }

        public void PhoneNumber()
        {
            InnerAttribute = new DataTypeWrapper(DataType.PhoneNumber);
        }

        public void Currency()
        {
            InnerAttribute = new DataTypeWrapper(DataType.Currency);
        }

        public void Text()
        {
            InnerAttribute = new DataTypeWrapper(DataType.Text);
        }

        public void Html()
        {
            InnerAttribute = new DataTypeWrapper(DataType.Html);
        }

        public void MultilineText()
        {
            InnerAttribute = new DataTypeWrapper(DataType.MultilineText);
        }

        public void EmailAddress()
        {
            InnerAttribute = new DataTypeWrapper(DataType.EmailAddress);
        }

        public void Password()
        {
            InnerAttribute = new DataTypeWrapper(DataType.Password);
        }

        public void Url()
        {
            InnerAttribute = new DataTypeWrapper(DataType.Url);
        }

        public void ImageUrl()
        {
            InnerAttribute = new DataTypeWrapper(DataType.ImageUrl);
        }
    }
}